$(document).ready(function () {
    $('.slickSlider,.slickSlider__product').slick({
        arrows: false,
        infinite: true,
        autoplay: true,
        autoplaySpeed: 2000,
        speed: 500,
        fade: true,
        cssEase: 'linear',
        dots: true,
    });

    $('.comment__list').slick({
        dots: false,
        infinite: true,
        autoplay: true,
        autoplaySpeed: 4000,
        adaptiveHeight: true,
        slidesToShow: 3,
        slidesToScroll: 2,
        responsive: [
            {
                breakpoint: 1024,
                settings: {
                    slidesToShow: 2,
                    slidesToScroll: 1,
                    infinite: true,
                    dots: true
                }
            },
            {
                breakpoint: 800,
                settings: {
                    slidesToShow: 1,
                    slidesToScroll: 1
                }
            }
            // You can unslick at a given breakpoint now by adding:
            // settings: "unslick"
            // instead of a settings object
        ]
    });

    var width = $(window).width();
    if (width > 785) {
        $(".comments__text_show").addClass('comments__text')
        $(".comments__text_show").hover(
            function () {
                $(this).removeClass('comments__text')
            },
            function () {
                $(".comments__text_show").addClass('comments__text')
            }
        );
    }
});
